<template>
    <Select v-model="output" style="width:200px" @on-change="chg" label-in-value :bind="$attrs">
        <Option v-for="item in areaList" :value="item.areaID" :key="item.areaID">{{ item.name }}
        </Option>
    </Select>
</template>
<script setup>
import http from '@/util/http'
import { reactive } from 'vue'
const $attrs = useAttrs();
const emit = defineEmits(['chg'])
let output = reactive({})
let areaList = reactive([])
const initAreaList = () => {
    http.get('/Basic/Area/List', {}, (response) => {
        areaList = response.data.data
    })
}
initAreaList();
const chg = (output) => {
    emit('areaChg', output);
}
</script>